The present disclosure relates to a bytecode processing device and an operation method thereof, and more particularly, to a device and a method for processing a bytecode of a program written in a programming language.
Script languages such as JavaScript, Python, MATLAB, PHP, R, and Lua are used in various fields. An interpreter-based virtual machine is widely used to execute the scripting languages. The interpreter-based virtual machine converts the script into bytecode, i.e., intermediate code, and executes the generated bytecode.
The dispatch loop of the interpreter is a loop that executes the generated bytecode, and the bytecode is processed by operations such as fetch, decode, and execute. An indirect branch may be performed to process the bytecode in the dispatch loop, and an indirect branch prediction may be performed to perform the indirect branch.
The indirect branch instruction needs accurate prediction of the target address of the indirect branch because the target address of the bytecode changes dynamically.